***************** Installing Stata packages
* From Julian Reif's Stata Coding Guide: https://julianreif.com/guide/


*******
* This script installs all necessary Stata packages into $maindir/Code/StataPackages
* To do a fresh install of all Stata packages, delete the entire StataPackages folder
*******

* Define a local installation directory for the packages
net set ado "$maindir/Code/StataPackages"


* Intall packages from SSC
foreach x in todate winsor2 reghdfe ftools moremata ds3 ivreghdfe ///
	ivreg2 ranktest rscript labutil distinct psacalc {
	ssc install `x', replace
}

* Install packages from Stata Journal
net install st0085_2, replace from("http://www.stata-journal.com/software/sj14-2") /* updated estout package */
net install gr0059_1, replace from("http://www.stata-journal.com/software/sj15-1") /* updated coefplot package */
net install st0043_2, replace from("http://www.stata-journal.com/software/sj10-4") /* updated parmest package */
net install st0035_1, replace from("http://www.stata-journal.com/software/sj10-4") /* updated multproc package */
